Unsplash - Get Popular Photos
(11 actions, 14 KB)
0 Comment
https://unsplash.com/documentation#list-photos
1 DataJar > GetValueIntent »
5
keyPath
:
API Credentials.Unsplash
2 Dictionary »
{ "page": "1", "per_page": "30" }
3 ToolboxProForShortcuts > CreateQueryItemIntent »
dictionary
:
[2 Dictionary]
inputType
:
dictionary
4 ToolboxProForShortcuts > BuildURLIntent »
path
:
/photos
host
:
api.unsplash.com
queryItems
:
[3 Query Item]
5 Get Contents of URL
[4 URL]
»
RequestVariable
:
[? Shortcut Result]
HTTPHeaders
:
{ "Authorization": "Authorization: Client-ID
[1 Value
as Dictionary.accessKey
]
", "Content-Type": "Accept-Version: v1" }
ShowHeaders
:
true
HTTPMethod
:
GET
HTTPBodyType
:
File
6 Get
Random Item
from List
[5 Contents of URL]
»
7
8
7 Get Dictionary Value for
urls.regular
in
[6 Item from List]
➔ regularURL
»
9
8 Get Dictionary Value for
links.html
in
[6 Item from List]
➔ shortURL
»
9 Dictionary »
{ "regularURL": "
[7 regularURL]
", "shortURL": "
[8 shortURL]
" }
10 Stop and Output
[9 Dictionary]